<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.rapid-framework.org.cn/rapid" prefix="rapid" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"  %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 
<rapid:override name="frame-header-style">
 <link rel="stylesheet" href="static/plugin/layui/css/layui.css">
    <link rel="stylesheet" href="static/css/back.css">
    <link rel="stylesheet" href="static/plugin/font-awesome/css/font-awesome.min.css">
    <style>
        /*覆盖 layui*/
        .layui-input-block {
            margin:0px 10px;
        }
        .layui-table {
            margin-top: 0;
        }
        .layui-col-md4 {
            padding:10px;
        }
        .layui-col-md8 {
            padding:10px;
        }
        .layui-btn {
            margin: 2px 0!important;
        }
    </style>
</rapid:override>

<rapid:override name="frame-content">
        <div style="padding:15px;">
            <blockquote class="layui-elem-quote">
				        <span class="layui-breadcrumb" lay-separator="/">
				              <a href="/admin">首页</a>
				              <a href="/admin/category">分类列表</a>
				              <a><cite>分类信息</cite></a>
				        </span>
				    </blockquote>
				            <div class="layui-col-md8" >
            <table class="layui-table" >
                <colgroup>
                    <col width="300">
                    <col width="100">
                    <col width="100">
                    <col width="100">
                    <col width="50">
                    <col width="50">
                </colgroup>
                <thead>
                <tr>
                    <th>名称</th>
                    <th>文章数</th>
                    <th>操作</th>
                    <th>ID</th>
                    <th>pid</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                            <td>
                                ${category.categoryName }
                            </td>
                            <td>
                                ${category.articleCount }
                            </td>
                            <td>
                                <a href="category/edit/${category.categoryId }" class="layui-btn layui-btn-mini">编辑</a>
                                <c:if test="${category.articleCount==0}">
                                        <a href="/admin/category/delete/${c.categoryId }" class="layui-btn layui-btn-danger layui-btn-mini" onclick="return confirmDelete()">删除</a>
                                </c:if>
                                </td>
                            <td class="cate-parent">${category.categoryId }</td>
                            <td>${category.categoryPid }</td>
                        </tr>
                            </tbody>
            </table>
        </div>
	  </div>
          
</rapid:override>
<%@ include file="../framework.jsp" %>